package test;

import static org.junit.Assert.assertEquals;

import org.jdom2.JDOMException;
import org.junit.Test;

import CDIO2.Field;

public class JUnitTestField {

	@Test
	public void testInit() {
		Field test = new Field(0);
		assertEquals(0,test.getNumber());
		assertEquals(1,new Field(1).getNumber());
		assertEquals(2,new Field(2).getNumber());
		assertEquals(3,new Field(3).getNumber());
		assertEquals(4,new Field(4).getNumber());
		assertEquals(5,new Field(5).getNumber());
		assertEquals(6,new Field(6).getNumber());
		assertEquals(7,new Field(7).getNumber());
		assertEquals(8,new Field(8).getNumber());
		assertEquals(9,new Field(9).getNumber());
		assertEquals(10,new Field(10).getNumber());
		assertEquals(11,new Field(11).getNumber());
	}
	
	@Test
	public void testFieldNotExsisting(){
		Field test = new Field(12);
		assertEquals(null, test.getName());
		assertEquals(0, test.getPoint());
		assertEquals(null, test.getMessege());
	}
	
	

}
